package cn.tips.dmp.supports.result;

/**
 * @author pkb
 */
public class ApiResultDTO {
    private String code;
    private String message;
    private Object content;

    private ApiResultDTO(ApiResultDTO.Builder builder) {
        this.code = builder.code;
        this.message = builder.message;
        this.content = builder.content;
    }

    public String getCode() {
        return this.code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return this.message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getContent() {
        return this.content;
    }

    public void setContent(Object content) {
        this.content = content;
    }

    @Override
    public String toString() {
        return "ApiResultDTO{code=" + this.code + ", message='" + this.message + '\'' + ", content=" + this.content + '}';
    }

    static class Builder {
        private String code;
        private String message;
        private Object content;

        Builder(String code, String message) {
            this.code = code;
            this.message = message;
        }

        ApiResultDTO.Builder addContent(Object content) {
            this.content = content;
            return this;
        }

        ApiResultDTO create() {
            return new ApiResultDTO(this);
        }
    }
}
